/**
 * 우편번호 검색
 * data : 2014.11
 * writer : me
 */

function winOpenInit() {
	
	document.getElementById("btnFind").onclick = search;
	
}
function search() {

	win = window.open("./win_sub.html", "win","");
}

function winSubInit() {
	
	tar = window.opener.document.frm;
	tar.address.value="우편번호를 검색하세요";
	var postNum = document.getElementById("sel");
	postNum.onchange = function() {
		var pos = postNum.selectedIndex;
		var zip = postNum[pos].value.split('-');
		var address = postNum[pos].text;
		
		tar.zip1.value = zip[0];
		tar.zip2.value = zip[1];
		tar.address.value = address;
	}
}

